<template>
    <van-row class="discount-section-list aui-bg-f" @click="fnOpenDetail(item.tao_id)">
        <van-col :span="8">
            <div class="image">
                <img :src="item.pict_url" alt="">
            </div>
        </van-col>

        <van-col :span="16" class="discount-section-list-content">
            <div class="top aui-text-6 aui-ftn15">
                <div class="tips">
                    {{item.user_type == "1" ? '天猫' : '淘宝'}}
                </div>{{item.title}}
            </div>
            <div class="md">
                <div class="price">
                    <span class="emb">￥</span>
                    <span class="aui-ftn18" v-text="item.quanhou_jiage"></span>
                    <span class="emb">券后</span>
                </div>
                <div class="discount aui-text-f">
                    <span>{{item.coupon_info_money | d_price}}元券</span>
                </div>
            </div>
            <div class="bb">
                <div class="b-price aui-text-6 aui-ftn13">￥{{totalPrice(item.coupon_info_money, item.quanhou_jiage)}}</div>
                <div class="aui-ftn12 aui-text-9">已售{{item.sellCount}}件</div>
            </div>
        </van-col>
    </van-row>
</template>
<script>
import "@/styles/discount.css"
export default {
    name: 'list',
    props: ['item', 'cid'],
    data () {
        return {
        }
    },
    mounted () {
    },
    filters: {
        d_price(price) {
            return price.substring(0, price.indexOf("."))
        }
    },
    methods: {
        fnOpenDetail (id) {
            this.utils.fnOpenCommon(this, {name: 'discount_detail', params: {cid: this.cid, id: id}})
        },
        totalPrice: function(price1, price2) {
            return parseFloat(price1) + parseFloat(price2)
        }
    }
}
</script>
